Subject: Re: [amos-list] Gui Read command syntax
From: Pietro Ghizzoni <[email-masked]>
To: [email-masked]
Date: Sat, 08 May 1999 17:56:01 +0200

From: Pietro Ghizzoni <[email-masked]>

Hello Andy

On 04-Mag-09, Andy \"Mushroom\" Kellett wrote: [amos-list] Gui Read command syntax

> Pietro added an extra parameter to his =Gui Read() command to give it 4
> arguments. The older version only had 3 and all my old posting routines
> were written in the old style. Anyone know what the last parameter should
> be? I used to know but cant for the life of me remember. Thanks.

Gui Read() with 4 arguments?? It just use 2 arguments... probably you're
talking about the Tcp Read command :)

the syntax is:

A=Tcp Read(tcp/ip channel,buffer,len,user data)

the new "user data" param allows you to specify a value, wich will be
returned, when you receive the reply to the Read request, using the Tcp User
command.

It's usefull if you've several requests out, maybe be on different servers,
for example a HTTP request and a NNTP one. In order to distinguish the HTTP
and the NNTP you can set the User Data of the HTTP request to 80 (the
default HTTP port) and the user data of the NNTP to 119 (anyway you can set
them as you want!)

So using the Tcp User command you know if you've received the reply of a
HTTP or NNTP request. I use this method in AmiGate because it's able to handle
HTTP,FTP,SMTP together dinamically, and so i need to know wich kind of
request has been replyed in order to call the right procedure.

-- 

Bye!

                                     !!!
                                     o o
   +-----------------------------oOO-(_)-OOo----------------------------+
   |                                                                    |
   |  Pietro Ghizzoni - Dairymen Soft              __  /// Amiga 12OO   |
   |     E-Mail:  [email-masked]                 \\\/// 'O3O  5OMhz   |
   |           ICQ 16361472                         \/// 18MB - CD4x    |
   |                                                                    |
   | Amos Development Group Coordinator                 AMIGA RULEZ!    |
   |                                                                    |
   +--------------------------------------------------------------------+

------------------------------------------------------------------------
What's "Grow to Give"?
http://www.onelist.com
It's a new incentive program at ONElist.  See homepage for details.
------------------------------------------------------------------------
Official AMOS WWW: http://members.xoom.com/AmosFactory/front.html